/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

body {
    font-size: 1em;
    line-height: 1.4em;
}  

a {
    color: #00e;
}

a:visited {
    color: #551a8b;
}

a:hover {
    color: #06e;
}

/*
 * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
 */

img {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/* Prevent callout */

.nocallout {
    -webkit-touch-callout: none;
}

.pressed {
    background-color: rgba(0, 0, 0, 0.7);
}

/* A hack for HTML5 contenteditable attribute on mobile */

textarea[contenteditable] {
    -webkit-appearance: none;
}

/* A workaround for S60 3.x and 5.0 devices which do not animated gif images if
   they have been set as display: none */

.gifhidden {
    position: absolute;
    left: -100%;
}

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    background-repeat: no-repeat;
    border: 0;
    direction: ltr;
    display: block;
    overflow: hidden;
    text-align: left;
    text-indent: -999em;
}

.ir br {
    display: none;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

[contenteditable="true"].single-line {
	white-space: nowrap;
	width: 200px;
	overflow: hidden;
}

[contenteditable="true"].single-line br {
	display: none;
}

[contenteditable="true"].single-line * {
	display: inline;
	white-space: nowrap;
}

.clearfix:before,
.clearfix:after {
    content: "";
    display: table;
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}


/* =================================
    MOSS CRVApp START
=================================*/

/* Device */
@screen_ratio: 0.4;
@screen_width_nexus : 2560px;
@screen_height_nexus: 1504px;

@screen_height: 100%; //@screen_height_nexus * @screen_ratio;
@screen_width: 100%;// @screen_width_nexus  * @screen_ratio;

.screen {
    width: @screen_width;
    height: @screen_height;
}


/* Grid */
@gutter: 20px; /* 960px total width */
@column: 35px; /* 960px total width */

.gutter {
    margin-left: @gutter;
}

.push_( @n){
    margin-left: @n * ( @column + @baseline );
}

.span_( @n){
    .cols_( @n);
    margin-left: @gutter;
}

.cols_( @n)
{
    width: @n * ( @baseline + @column - 2);
}

.column_( @n){
    width: @screen_width / ( @n );
}

.span_1  { .span_( 1);}
.span_2  { .span_( 2);}
.span_3  { .span_( 3);}
.span_4  { .span_( 4);}
.span_5  { .span_( 5);}
.span_6  { .span_( 6);}
.span_7  { .span_( 7);}
.span_8  { .span_( 8);}
.span_9  { .span_( 9);}
.span_10 { .span_( 10);}
.span_11 { .span_( 11);}
.span_12 { .span_( 12);}
.span_13 { .span_( 13);}
.span_14 { .span_( 14);}
.span_15 { .span_( 15);}
.span_16 { .span_( 16);}
.span_17 { .span_( 17);}
.span_18 { .span_( 18);}

.push_1  { .push_( 1);}
.push_2  { .push_( 2);}
.push_3  { .push_( 3);}
.push_4  { .push_( 4);}
.push_5  { .push_( 5);}
.push_6  { .push_( 6);}
.push_7  { .push_( 7);}
.push_8  { .push_( 8);}
.push_9  { .push_( 9);}
.push_10 { .push_( 10);}
.push_11 { .push_( 11);}
.push_12 { .push_( 12);}
.push_13 { .push_( 13);}
.push_14 { .push_( 14);}
.push_15 { .push_( 15);}
.push_16 { .push_( 16);}
.push_17 { .push_( 17);}
.push_18 { .push_( 18);}



/* Typography */
@font-face {
    font-family: 'Myriad';
    font-weight: 400;
    src: url("font/MYRIADPRO-REGULAR.otf") format("opentype");
}
@font-face {
    font-family: 'Myriad';
    font-weight: 600;
    src: url("font/MYRIADPRO-SEMIBOLD.otf") format("opentype");
}
@font-face {
    font-family: 'Myriad';
    font-weight: 800;
    src: url("font/MYRIADPRO-BOLD.otf") format("opentype");
}

@typo_base: 0.04; /* screen height ratio */
@line_height: 0.0425; /* 64px */
@baseline: 604px * @line_height;
@small: 0.75em;
@bold: 800;
@font_base: 24px;
@semibold: 600;

.h1
{
    font-size:1.3em;
}

.h2
{
    font-size: 0.85em;
}

.emphase
{
    font-weight: 600;
    font-size: @baseline *1.9;
}

.small { 
    font-size: @small;
}
.bold{
    font-weight: @bold;
}

.semibold {
	font-weight: @semibold;
}

.subtitle {
    font-size: 0.5em;
}

.basic_touch {
    .font;
    font-size: 0.70em;
}

.row {
    text-align: bottom;
	width: @screen_width;
 }

.font {
    font-family: 'Myriad';
    font-style: 'normal';
    font-weight: 400;
}

h1 {
    .h1;
    font-weight: 600;
    ._light_text_shadow
}

h2 {
    .h2;
    font-weight: 600;
}


body {
    font-size: @font_base;
    color: @dark_gray;
	background-color: @light_gray;
    .font;
}

h1,h2,p {
    margin: 0;
    padding: 0;
    margin-bottom: @baseline;
    line-height: @baseline;
}

label {
    margin: 0;
    padding: 0;
    margin-bottom: @baseline;
    line-height: @baseline;
    color: @label_grey;
    font-weight: 600;
    font-size: 0.85em;
}

table tr
{
    font-size: 1em;
    cursor: pointer;
}

#page1 table tbody tr
{
    ._light_row_shadow
}

/* Colors */
@super_light_neutral: rgb( 230,230,230);
@light_gray: rgb( 219,219,219);
@mid_gray: rgb( 192,192,192);
@dark_gray:  rgb(  96, 96, 96);
@dark_shadow: rgba(  100, 100, 100, 0.2);
@transparent_blue: rgba( 0,157,255,0.03);
@transparent_red:  rgba( 255,0,0,0.03);
@blue: rgb( 0,160,255);
@color: @blue;
@dark: @dark_gray;
@label_grey: rgb( 199, 200, 202);

.invert_color
{
    color: white;
    background-color: @color;
}

/* Boxes */
@view_margin: 10px;

#view {

    background-color: @light_gray;
    background: url("../img/logo_moss_t.png") no-repeat scroll right bottom @light_gray;
}


/* Sprites */
.sprite {
    background-image: url('/img/sprites.png');
    background-repeat: no-repeat;
}

.arrow_down{
    height: 10px;
    width:  15px;
    background-position: 0 -8px;
}

.arrow_down_blue{
    height: 7px;
    width: 15px;
    background-position: 0 0;
}


/* Graphic Kit */
.color { color: @blue;}

.card_shadow {
    box-shadow: 0px 2px 0px 0px @dark_shadow;
}

._light_text_shadow
{
    text-shadow: 0px 2px 1px rgba(0,0,0,0.2)
}

._light_row_shadow
{
    /*background-color: rgba(0,0,0,0.1);
    box-shadow: 0 50px 40px 20px white inset;*/
    background: url("../img/row_shadow.png") repeat-x scroll left top white;
}

.graphe {
    height: @baseline;
}

.bg_color { background-color: @color;}
.bg_dark { background-color: @dark;}



/* Table */
table {
    background: white;
    clear: both;
    padding-left: @baseline;
}

tr { 
    width: 100%;
    .basic_touch;
    height: @baseline*2;
}

th {
    .small;
    .bold;
    text-align: left;
    height: 2*@baseline;
}

td {
    /* border-bottom: solid 1px @light_gray;*/
}

th,td {
    width: auto;

}

hr
{
    width: 80%;
    border: solid 1px;
    color: @super_light_neutral;
    clear:both;
}

/* Card */
.legend {
    float: left;
}

@baseline: 30px;
@font_size: 24px;
@bold: 800;
@regular: 400;

.rounded_corners
{
    border-radius: 2px;
}

.card
{
    background-color: white;
    .card_shadow;
    .span_( 5);
    padding: @baseline;
    padding-top: @baseline*0.6;
    margin-bottom: @baseline*0.5;
    margin-left: @baseline*0.5;
    font-size: @font_size;
    .fluide;
}

#crme_cards .cards
{
    float:left;
}

.card.active .title
{
    .invert_color;
    display: inline-block;
}

.card .title, .edit_section .title
{
    font-weight: @bold;
    color: @color;
    margin-bottom: @baseline;
    ._light_text_shadow
}

.card .subtitle, .edit_section .subtitle
{
    font-weight: @regular;
    font-size: inherit;
    color: @mid_gray;
}

.card .label, .edit_section .label
{
    font-weight: @regular;
    color: @color;
}

.card .data
{
    font-weight: @regular;
    color: @dark_gray;
}

.card .subtitle, .card .label, .card .data
{
    display: table-cell;
}

.edit_section .header
{
    .invert_color;
    display: table;
        font-weight: @bold;
        margin-bottom: @baseline;
}


.card .line
{
    display: table-row;
}

/* Gauge */
.gauge {
    height: 100%;
}

/* General Dashboard ================================== */
#crva_list_container {
    background-color: white;
    height: 80%;
    padding: 0 @baseline;
}

#crva_list_table
{
    .fluide;
}

#crva_list_table thead > tr:active
{
    background-color: red;
}

#crva_list_table tbody > td
{
    width: 100%;
}

#logo {
    background-color: white;
    width: 50px; margin-top: -10px; margin-left: 30px; margin-right: -50px;
}

#top_panel {
    margin-bottom: @baseline*0.4;
    padding-bottom: @baseline*0.5;
    padding-top: @baseline;
    background-color: white;
    .card_shadow;
}

#flight_widgets_container
{
    width: 100%;
}

#unfold
{
    display: block;
    height:20px;
    /* background: url('../img/fleche_bas.png') center center no-repeat;*/
}

#unfold.unfolded
{
    background-image: url('../img/fleche_haut.png')
}

#crva_list_container.unfolded
{
    height: 100%;
}

#page1
{
    overflow-x: hidden;
    overflow-y: auto;}

#crva_list_widgets_container .card
{
    float: left;
}

#rect_dark { width: 70%;}
#rect_color { width: 90%;}

/* Flight Details ======================================== */
#top_panel_crva {
    /*padding-bottom: @baseline*0.5;*/
    padding-top: @baseline;
    background-color: white;
    .card_shadow;
    min-height: 60px;
}

.inline {
    display: inline-block;   
}

.low_size {
    font-size: smaller;
}

.big_size {
	font-size: 1.50em;
	.bold;
}

.card_text {
	.semibold;
	font-size: 0.85em;
}

.spacer {
	padding-bottom:@baseline*0.05;
}

.jauge_background {
	background-color: @light_gray;
	height: 35px;
}

.jauge_foreground {
	background-color: @dark_gray;
	width: 50%;
	height: 35px;
}

#flight_hours_1 canvas, #flight_hours_2 canvas
{
    width: 70px;
}

#flight_hours_1, #flight_hours_2 {
    margin-left: 50px;
}


#flight_hours_1 { margin-left: 0; margin-right:20px;}


#flight_hours table {
    margin-bottom: 30px;
}

#flight_hours td
{
    width: 60px;
}

/* Edition Panel ============================*/
#edit_panel
{
    .card_shadow;
    background-color: @light_gray;
   .fluide;
}

#edit_flight_details
{
    .animated;
}

.data.active
{
    background-color: @dark_gray;
    color: white;
}

#validate
{
    text-align: center;
    position:absolute;
    right: @baseline*2;
    margin-top: @baseline*0.15;
    line-height: normal;
}   



/* Graphic kit for edit mode */
.button_shadow
{
    box-shadow: none;
}

.button
{
    background-color: white;
    color: @mid_gray;
    border: solid 1px @mid_gray;
    font-weight: 600;
    margin: 0;
    padding: 5px 12px;
    display: block;
    float: left;
    .button_shadow;
    .rounded_corners;
    text-align: center;
    cursor: pointer;
}

.button:hover
{
    background-color: @dark_gray;
    color: white;
}

.edit_section
{
    padding: @baseline;
    padding-top: @baseline*0.6;
    margin-bottom: @baseline*0.5;
    margin-left: @baseline*0.5;
    font-size: @font_size;
}

.edit_section .title.selected
{
    background-color: @color;
    color: white;
    display: inline-block;
}

.edit_section .type_text
{
    display: table-cell;
    font-size: 64px;
    font-weight: 600;
    height: 74px;
    line-height: 64px;
}

#demo_text_editor_input
{
    display: block;
    background-color: @dark_gray;
    color: white;
    border: none;
    padding: none;
}

.edit_section tr
{
    font-size: 1em;
}

.edit_section tbody tr:hover
{
    background-color: @light_gray;
}


.edit_section tr td
{
    border: none;
}

.edit_section .black_input
{
    box-shadow: inset 0px 2px 10px black;
}

.type_list tr.active
{
    background-image: none;
    background-color: @dark_gray;
    color: white;
}

#moss_return
{
    margin-top: -5px;
    margin-left: @baseline*0.5;
}

.demo_slide
{
    display: none;
    background-color: white;
    margin-top: @baseline/2;
}

/* Widgets */

#edit_flight_consumption
{
    margin-right: 3*@baseline;
}

#edit_flight_consumption .wrapper
{
    position: relative;
    width: 100%;
    height: @baseline*2;
}
#edit_flight_consumption .wrapper:after
{
    clear:both;
}

#slider-carburantConsomme, #slider-carburantConsomme-data, #slider-carburantTotal
{
    background-color: white;
    height: 100%;
    line-height: normal;
}

#slider-carburantConsomme .ui-slider-range
{
    background-color: @dark_gray !important;
    background-image: url( '/img/fleches_slider.png');
    background-position: center right;
    background-repeat: no-repeat;
    height: inherit;
    width: 2em;
    top: 0;
    margin: 0;
    cursor: e-resize;
    border: none;
}
#slider-carburantConsomme-data
{
    background-color: @dark_gray;
    width: 20%;
    float:left;
    color: white;
    .emphase;
}

#slider-carburantConsomme
{
    float: left;
    width: 80%;
}

#slider-carburantTotal
{
    margin-top: @baseline*0.5;
    width: 100%;
    background-color: @light_gray;
    .emphase;
}

.fluide
{
    -webkit-transform:translateZ(0);
}

/* Datepicker */
#flight-gdh-begin, #flight-gdh-end
{
    width: 300px;
}

.hasDatepicker a
{
    text-decoration: none;
    color: @mid_gray;
}

.ui-datepicker-calendar
{
    width: 100%;
    margin-bottom: @baseline;
}

.ui-datepicker-header
{
    position: relative;
}

.ui-datepicker-header a
{
    position: absolute;
    background: url('/img/sprites.png') bottom left no-repeat;
    text-indent: -999px;
    height: @baseline;
    background-size: 2em;
    height: 23px;
    width: 13px;
}

.ui-datepicker-header .ui-datepicker-prev
{
    left:0;
}

.ui-datepicker-header .ui-datepicker-next
{
    right:0;
    background-position: bottom right;
}

.ui-datepicker-header .ui-datepicker-title
{
    text-align: center;
}

.ui-datepicker-header .ui-datepicker-title span
{
    padding: 8px 5px;
    color: white;
    background-color: @dark_gray;
    margin-right: 10px;
}

.ui-datepicker-calendar thead
{
    color: @light_gray;
}

.ui-datepicker-calendar td
{
    padding-top: 5px;
}

.ui-datepicker-calendar tr
{
    height: auto;
    line-height: normal;
}

.ui-datepicker-calendar tr:hover
{
    background-color: white;
}

.ui-datepicker-calendar td:hover
{
    color: white;
    background: @dark_gray;
}

.ui-datepicker-calendar td,.ui-datepicker-calendar th
{
    font-weight: 600;
    text-align: center;
}

.ui-datepicker-calendar .ui-state-highlight
{
    color: @color;
}

.ui-datepicker-calendar td a
{
    display: block;
}

.ui-datepicker-calendar .ui-state-active
{
    background-color: @dark_gray;
    color: white;
}

/* Time Spinner */
.timespinner
{
    margin-left: @baseline * 2;
    font-size: @baseline * 4;
    text-align: center;
}

.timespinner tr
{
    height: auto;
    border-collapse: collapse;
}

.timespinner tr:hover
{
    background-color: transparent;
}

.timespinner input
{
    box-shadow: none;
    width: 120px;
    border: none;
    color: @light_gray;
    text-align: center;
    padding: 0 8px;
    margin: 0 auto;
}

.timespinner input:focus
{
    color:white;
    background-color: @dark_gray;
}

.timespinner .up, .timespinner .down
{
    font-size: @baseline;
    color:@dark_gray;
}

.timespinner .sep
{
    color: @light_gray;
    font-size: @baseline*2;
}

/* Editable List */
.table_editor
{
    cursor:pointer;
}

.editable_list_edit_panel
{
}

.editable_list_table tr.edit_table_selected_row
{
    color: white;
    background-color: @dark_gray;
}

.editable_list_table th
{
    color: @mid_gray;
    padding: 3px 12px;
    text-align: center;
}

.editable_list_table td
{
    text-align: center;
}

.editable_list_table tfoot
{
    .small;
}

.editable_list_table tfoot tr:hover
{
    background-color: transparent;
}

.editable_list_ctrl
{
    display: block;
    float: left;
    padding: 5px 12px;
    margin: 0 10px;
    color: @color;
}

.editable_list_ctrl:hover
{
    background-color: @dark_gray;
    color: white;
}

.editable_list_ctrl.selected
{
    background-color: @mid_gray;
}


/* Animations */
.animated
{
    transition: all 0.5s;
    -webkit-transform:translateZ(0);
}


/* Main Layout */
#view
{
    height:100%;
}

#top_section_header_menu
{
    
}

#cards_container
{
    position: relative;
    width: 100%;
    height: auto;
    display: table-row;
}

#cards_container.edit_mode
{
    width: 405px;
    display: block;
}

#edit_panel
{
    width: 0px;
}

#edit_panel.edit_mode
{
    width:80%;
}

#page1,#page2
{
    height: 100%;

}

#top_panel_crva
{
    height: 8%;
}

#flight_widgets_container, #edit_panel
{
    height: 86%;
    overflow: auto;
    .animated;
}

#flight_widgets_container
{
    padding-top: @baseline*0.5;
}

html,body
{
    height: 100%;
    overflow: hidden;
}

#addFlight {
	position: relative;
	clear: both;
}

#crme_zones
{
    height: 100%;
    display: none;
    width: 0;
    .animated;
}

.master_layout
{
    .animated;
}

#flight_widgets_container.folded
{
    left: -390px;
}

#edit_panel.folded
{
    height: @baseline*2;
}

#crme_zones.folded
{
    height: 0;
}

/* Navigation */
#flight_widgets_container
{
    .animated;
    height: 84%;
    overflow-x: hidden;
}

#flight_widgets_container.semifold
{
    width: 405px;
}

#flight_widgets_container.fold
{
    width: 40px;
    overflow: hidden;
}

#flight_widgets_container.semifold.fold
{
    position: relative;
    opacity: 0.5;
}

#edit_panel
{
    width: 68%;
    .animated;
    height: 100%;
}

#edit_panel.fold
{
    width: 0%;
}

#edit_panel.unfold
{
    width: 95%;
    overflow: hidden;
}

.edit_panel_slides_wrapper
{
    background-color: white;
    height: 100%;
    .animated;
}

.edit_panel_slides_wrapper.fold
{
    height: 100px;
    /* TODO: put active CRME in CRME header */
    overflow: hidden;
}

#crme_cards_wrapper
{
    display: block;
    .animated;
    overflow: hidden;
    height: 100%;
}

#crme_cards_wrapper.fold
{
    height: 0%;
}

#crme_cards
{
    padding-top: @baseline*0.5;
    width: 100%;
    .animated;
    background-color: @light_gray;
    float: left;
    height: 100%;
    overflow: auto;
}

#crme_cards.semifold
{
    width: 405px;
    display: block;
}

#crme_cards.fold
{
    width: 0px;
}

#crme_edit
{
    background-color: @light_gray;
    width: 90%;
    display: block;
    .animated;
    float: left;
    width: 70%;
    height: 100%;
    overflow: auto;
    padding-top: @baseline*0.5;
}

#crme_edit.fold
{
    width: 0px;
    overflow: hidden;
}

.crme_slide
{
    background-color: white;
}

#crva_list_table_wrapper .dataTables_info,#crva_list_table_wrapper .dataTables_paginate 
{
	font-size: @small;
}
/* Helpers */
.float { float: left;}
.clear { clear: both;}
.full { margin: 0;}
.alpha { margin-left: 0;}
.omega { margin-right: 0;}
.last { margin-bottom: @baseline;}
.noborder { border:none; background-color: white;}
.top { z-index: 99; position: relative;}
.hidden { display: none;}

/* MOSS CRVApp END */